package com.db.javaschool.kislros;

public class SelfLocker {

	boolean locked = false;
	
	synchronized void lock() {
		if (!locked) {
			System.out.println(locked);
			locked = true;
			lock();
		}
	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new SelfLocker().lock();
	}

}
